home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1994-03-12 | 1.7 KB | 76 lines |
- ' *************************************
- ' * *
- ' * Drops V1.0 *
- ' * Written by Chris Hodges *
- ' * *
- ' *************************************
- '
- ' Dieses Programm simuliert Farbtropfen
- ' Es sind Bilder bis 16 Farben erlaubt.
- ' Au�erdem k�nnen die Farben der Tropen ge�ndert werden (siehe unten).
- '
- Screen Open 1,320,16,32,0
- Flash Off : Screen Hide 1
- Screen Open 0,320,256,32,0
- Curs Off : Flash Off : Paper 0 : Cls 0
- Cls 31 : Ink 32 : Circle 7,7,8
- Paint 8,8
- Bar 0,0 To 15,7
- Get Block 1,0,0,16,16
- Load Iff "Test16.iff"
- Screen 1 : Get Palette 0 : Screen 0 : For A=0 To 31 : Colour A,0 : Next
- Screen 1
- For A=0 To 15
- C=Colour(A)
- Colour A+16,C
- ' Hier k�nnen f�nf vorgegebene Routinen benutzt werden:
- ' Gosub HALFBRIGHT: Verdunkelt das Bild
- ' Gosub INVERS : Invertiert alle Farben
- ' Gosub BLACKWHITE: Grautonbild
- ' Gosub ZERO : Alles schwarz
- ' Gosub BLOOD : Blut!
- Gosub BLOOD
- Colour A,C
- Next
- Fill Logbase(4) To Logbase(4)+(Screen Width/8)*Screen Height,-1
- Dim F(31)
- Randomize Timer
- For A=0 To 19
- F(A)=-16
- Next
- Screen 0 : Fade 3 To 1
- A=0 : D=20
- Do
- Repeat : A=Rnd(19) : Until F(A)<256 and F(A)>-17
- Put Block 1,A*16,F(A),%10000,%10000000
- Add F(A),Rnd(3)+1
- If F(A)>255 Then F(A)=-30 : Dec D
- Exit If D=0
- Loop
- End
- INVERS:
- C=$FFF-C
- Return
- ZERO:
- Colour A+16,0
- Return
- HALFBRIGHT:
- R=(C and $F00)/$100
- G=(C and $F0)/$10
- B=C and $F
- C=(R/3)*$100+(G/3)*$10+(B/3)
- Return
- BLOOD:
- R=(C and $F00)/$100
- G=(C and $F0)/$10
- B=C and $F
- ' C=(R/3)*$100+(G/3)*$10+(B/3)
- Colour A+16,C
- C=Min(R+8,15)*$100+G*$10+B
- Return
- BLACKWHITE:
- R=(C and $F00)/$100
- G=(C and $F0)/$10
- B=C and $F
- C=(R+G+B)/3*$111
- Return